<script type="text/javascript" src="<?= URL::base() ?>static/administration/js/ckeditor/ckeditor.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" media="screen" href="<?= URL::base() ?>static/administration/js/elfinder/css/elfinder.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="<?= URL::base() ?>static/administration/js/elfinder/css/theme.css">

<!-- elFinder JS (REQUIRED) -->
<script type="text/javascript" src="<?= URL::base() ?>static/administration/js/elfinder/js/elfinder.min.js"></script>

<!-- elFinder translation (OPTIONAL) -->
<script type="text/javascript" src="<?= URL::base() ?>static/administration/js/elfinder/js/i18n/elfinder.ru.js"></script>

<script type="text/javascript">
	options = {
		url  : '<?= URL::base() ?>static/administration/js/elfinder/php/connector.php',
		lang : 'ru',
		'resizable' : false
	}
</script>

<div class="well">
	<?= Form::open($actionLink, array('method' => 'post', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal')) ?>
		<? foreach ($params['fields'] as $key => $item): ?>
			<div class="control-group">
				<label class="control-label" for="input<?= $item['name'] ?>"><?= $item['title'] ?></label>
				<div class="controls">
					<?
						switch ($item['type']) {
							case 'text': // обычное текстовое поле
								echo Form::input($item['name'], $obj->$item['name'], array('id' => 'input'.$item['name'], 'placeholder' => $item['title'], 'class' => 'span3'));
								break;
						}
					?>
				</div>
			</div>
		<? endforeach ?>
		<div class="control-group">
			<label class="control-label"></label>
			<div class="controls">
				<button type="submit" class="btn btn-primary">Сохранить</button>
			</div>
		</div>
	<?= Form::close() ?>
	<hr />
	<h1>Сгенерировать несколько случайных пин кодов</h1>
	<?= Form::open('administration/Apins/generate', array('method' => 'post', 'class' => 'form-horizontal')) ?>
		<div class="control-group">
			<label class="control-label" for="inputcount">Количество</label>
			<div class="controls">
				<?= Form::input('count', '', array('id' => 'inputcount', 'placeholder' => 'Количество', 'class' => 'span3')) ?>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label"></label>
			<div class="controls">
				<button type="submit" class="btn btn-primary">Сгенерировать</button>
			</div>
		</div>
	<?= Form::close() ?>
</div>